{extend name="layout" /}
{block name="body"}
<main role="main" class="flex-shrink-0">
  <div class="container py-3">
    
    <div class="row">

      <div class="col-xl-8">
        <article class="lyear-arc">
          <div class="arc-header">
            <h5 class="arc-title">{$info.title}</h5>
            <ul class="arc-meta">
                {php}
                if (!empty($info['column_route_name'])) {
                    $column_url = url('/article/'.$info['column_route_name']);
                } else {
                    $column_url = url('/article/list_'.$info['cid']);
                }
                {/php}
                <li><i class="mdi mdi-calendar"></i> <a href="{$column_url}">{$info.column_title}</a></li>
              <li><i class="mdi mdi-calendar"></i> {$info.create_time}</li>
              <li><i class="mdi mdi-comment-multiple-outline"></i> {$info.clicks} 阅读</li>
            </ul>
          </div>
          
          {notempty name="info['cover']"}
          <div class="arc-preview">
            <img src="{$info.cover|get_file_path}" alt="{$info.title}" class="img-fluid rounded" />
          </div>
          {/notempty}

          <div class="lyear-arc-detail">
            {$info.content|raw}


            {php}
            $tags_arr = explode(',', $info['tags']);
            $tags_count = count($tags_arr);
            {/php}
            {notempty name="$info['tags']"}
            <div class="mt-5">
              <h6 class="mb-2">Tags:</h6>
              <div class="tag-cloud">
                {volist name="tags_arr" id="tag" key="k"}
                <a href="/tag/{$tag}" class="badge badge-primary">{$tag}</a>
                {/volist}
              </div>
            </div>
            {/notempty}

          </div>

        </article>
      </div>
      <!-- 内容 end -->
  
      <!-- 侧边栏 -->
      <div class="col-xl-4">
        <div class="lyear-sidebar">
          
          <!-- 热门文章 -->
          <aside class="widget widget-hot-posts">
            <div class="widget-title">热门文章</div>
            <ul>
              {volist name="hot_arc" id="arc"}
              <li>
                <a href="{:url('/article/'.$arc['id'])}">{$arc.title}</a> <span>{$arc.create_time}</span>
              </li>
              {/volist}
            </ul>
          </aside>
  
        </div>
      </div>
      <!-- 侧边栏 end -->
    </div>
  
  </div>
</main>
{/block}